#include "SubState.h"
#include <cstdio>

#include "LightsSystem.h"
RedState::RedState()
:State(3)
{
}
RedState::~RedState(){
}
void RedState::on(){
    printf("Red Light On.\n");
}
void RedState::off(){
    printf("Red Light Off.\n");
}
void RedState::onTimeout(LightsSystem * ls){
    State::onTimeout(ls, LightsSystem::yellowState);
}



YellowState::YellowState()
:State(2)
{
}
YellowState::~YellowState(){
}
void YellowState::on(){
    printf("Yellow Light On.\n");
}
void YellowState::off(){
    printf("Yellow Light Off.\n");
}
void YellowState::onTimeout(LightsSystem * ls){
    State::onTimeout(ls, LightsSystem::greenState);
}

GreenState::GreenState()
:State(4)
{
}
GreenState::~GreenState(){
}
void GreenState::on(){
    printf("Green Light On.\n");
}
void GreenState::off(){
    printf("Green Light Off.\n");
}
void GreenState::onTimeout(LightsSystem * ls){
    State::onTimeout(ls, LightsSystem::redState);
}
